#include<iostream>

using namespace std;

int main()
{
    FILE* fp=fopen("test.txt","r");
    if(fp==nullptr)
    {
        perror("fopen errot");
        exit(1);
    }

    char buf[100];
    fread(buf,100,1,fp);

    fclose(fp);
    cout<<"read: "<<buf<<endl;

    return 0;
}